package com.bvgol.examples.springboot.elk.controller;/**
 * @Classname TestController
 * @Description TODO
 * @Date 2021/4/6 11:22
 * @Created by GUOCHEN
 */

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: my-spring-completely
 * @description:
 * @author: GUOCHEN
 * @create: 2021/04/06 11:22
 */
@RestController
@RequestMapping("/elk")
public class TestController {

    @Value("server.port")
    private String port;

    Logger logger = LoggerFactory.getLogger("TestController");

    @GetMapping("/test1")
    public String test() {
        logger.info("你好啊e");
        logger.warn("This is a warn message!");
        logger.error("This is error message!");
        return "server被调用了！:" + port;
    }
}
